<?php
/**
 * Created by PhpStorm.
 * User: ZZF
 * Date: 2017/3/16
 * Time: 11:36
 */

namespace app\admin\model;
use think\Model;
use think\Verify;
class CarsModel extends Model{
	protected $validate = [
         'rule' => [
			'name' => "require|length:2,32",
			'plate_no' => "require|unique:cars|length:5,32"
		 ],
         'msg'  => [
			'name.require' => "车辆名称必须填写！",
			'name.length' => "车辆名称长度必须不少于2且不超过32",
			'plate_no.require' => "车牌号必须填写！",
			'plate_no.unique' => "车牌号已存在！",
			'plate_no.length' => "车牌号长度必须不少于5且不超过32"
		 ]
    ];
}
